﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace Manul.Interface
{
    public class AppMessages
    {
        private IWin32Window owner = null;
        public AppMessages() { }
        public AppMessages(IWin32Window owner)
        {
            this.owner = owner;
        }
        public void ShowError(String errorText)
        {
            if (owner != null)
            {
                MessageBox.Show(owner, errorText, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
            else
            {
                MessageBox.Show(errorText, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
        public void Show(String text)
        {
            if (owner != null)
            {
                MessageBox.Show(owner, text);
            }
            else
            {
                MessageBox.Show(text);
            }
        }
    }
}
